package falling 
{
	import org.flixel.FlxG;
	/**
	 * ...
	 * @author morgan
	 */
	public class Cloud extends SelectableObject
	{
		[Embed (source = "../../data/falling/2_cloud.png")] private var img_cloud:Class;
		public function Cloud(x:int, y:int) 
		{
			super(x, y, img_cloud);
			selectable = false;
		}
		
		override public function update():void 
		{
			super.update();
			if ( !(FlxG.state as FallingState2).sun.selectable)
			{
				selectable = true;
			}
			velocity.x = dx / dist * selectedValue * -20;
			velocity.y = dy / dist * selectedValue * -20;
		}
		
	}

}